package com.yodawnla.attackTitan2;

import com.yodawnla.lib.YoActivity;
import com.yodawnla.lib.util.tool.YoTimer;


public class SoundMgr
{
	boolean mIsPlaying = false;

	public static SoundMgr getInstance()
	{
		if (instance == null)
			instance = new SoundMgr();
		return instance;
	}

	static SoundMgr instance;
	private SoundMgr()
	{
		YoTimer updateTimer = new YoTimer(0.1f)
		{
			@SuppressWarnings("static-access")
			@Override
			public void onTimePassed()
			{
				YoActivity.getBaseActivity().getBaseActivity().runOnUpdateThread(new Runnable()
				{
					public void run()
					{
						mIsPlaying = false;
					}
				});
			}
		};
		updateTimer.start();
	}
	
	public void playing()
	{
		mIsPlaying = true;
	}
	
	public boolean getIsPlaying()
	{
		return mIsPlaying;
	}
}